package Year22_Month03.day17;

import java.util.ArrayList;
import java.util.Scanner;

public class Main2 {
    public static void main(String[] args) {
        Scanner sc =  new Scanner(System.in);
        while(sc.hasNext()){
            String s = sc.nextLine();
            ArrayList<Character> myarr = new ArrayList<>();
            int[] arr = new int[27];
            for (int i = 0; i < s.length(); i++) {
                if(myarr.contains(s.charAt(i)) == false){
                    myarr.add(s.charAt(i));
                    arr[myarr.indexOf(s.charAt(i))] += 1;
                }else{
                    arr[myarr.indexOf(s.charAt(i))] += 1;
                }
            }
            boolean flag = false;
            for (int i = 0; i < arr.length; i++) {
                if(arr[i] == 1){
                    flag = true;
                    System.out.println(myarr.get(i));
                    break;
                }
            }
            if(flag == false){
                System.out.println(-1);
            }
        }
    }
}
